package year2019.month12;

public class MulTab {

    public static void main(String args[]) {
        print(9, 1);
    }

    public static void print(int max, int start) {
        if (start == max) {
            printLine(start, 1);
            return;
        }
        printLine(start, 1);
        start++;
        System.out.println();
        print(max, start);
    }

    public static void printLine(int first, int second) {
        if (first == second) {
            printOne(first, second);
            return;
        }
        printOne(first, second);
        second++;
        printLine(first, second);
    }

    public static void printOne(int i, int j) {
        System.out.print(j + "*" + i + "=" + i * j + "\t");
        return;
    }

}
